@extends('admin.layout.main')

@section('content')
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
<ul class="breadcrumb">
	<li>
		<i class="ace-icon fa fa-home home-icon"></i>
		<a href="#">委托管理</a>
	</li>
	<li class="active"><a href="{{ url('admin/entrust_list') }}">委托列表</a></li>
</ul><!-- /.breadcrumb -->

<div class="nav-search" id="nav-search">

</div><!-- /.nav-search -->

</div>
<form class="form-search" action="/admin/entrust_order" method="post">
    <span class="page-content">选择币种：</span>
    <span class="input-icon">
        <input type="hidden" name="_token" value="{{csrf_token()}}"/>
        <select name="cid" id="">
		<option value="" @if(empty($cid))selected="selected"@endif>请选择币种</option>
		@foreach($price as $k=>$v)
            <option value="{{$v->id}}" @if($cid == $v->id)selected="selected"@endif>{{$v->name_en}}</option>
            @endforeach
        </select>
	</span>
    {{--<span class="page-content">选择分类：</span>--}}
    {{--<select name="" id="">--}}
        {{--<option value="">1</option>--}}
        {{--<option value="">1</option>--}}
        {{--<option value="">1</option>--}}
    {{--</select>--}}
    <span class="page-content">购买人id：</span>
    <input type="text"  name="like_account" value="{{$like_account}}" class="nav-search-input" id="nav-search-input" autocomplete="off" />
	<i class="icon-only ace-icon fa fa-list"></i>
	<b class="text-primary">*开始时间 </b>
	&nbsp;
	<div id="toggle-result-format" class="btn-group btn-overlap" data-toggle="buttons">
		<input type="text" name="start_time" id="start_at" @if($start_time) value="{{$start_time}}" @endif />
	</div>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<i class="icon-only ace-icon fa fa-crosshairs"></i>
	<b class="text-primary">*结束时间 </b>
	&nbsp;
	<div id="toggle-result-format" class="btn-group btn-overlap" data-toggle="buttons">
		<input type="text" name="end_time" id="back_date"  @if($e_time) value="{{$e_time}}" @endif  />
	</div>
    <button class="btn btn-info" type="submit" >
        查找
    </button>
    </span>
</form>
<div class="page-content">
	<div class="row">
		<div class="col-xs-12">
			<!-- PAGE CONTENT BEGINS -->
			<div class="row">
				<div class="col-xs-12">
					<div class="clearfix">
						<div class="pull-right tableTools-container"></div>
					</div>
					<div class="table-header">
						{{--<a href="{{ url('admin/currency_add_view') }}">--}}
						{{--<i class="menu-icon fa fa-plus orange"></i>--}}
						{{--<span class="menu-text orange"> 添加币种 </span>--}}
						{{--</a>--}}
					</div>

					<!-- div.table-responsive -->

					<!-- div.dataTables_borderWrap -->
					<div>
						<table id="dynamic-table" class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
									<th>序号</th>
									<th>成交编号</th>
									<th>类型</th>
									<th>卖家ID</th>
									<th>买家ID</th>
									<th>币种</th>
									<th>数量</th>
									<th>成交价格</th>
									<th>手续费</th>
									<th>
										<i class="ace-icon fa fa-clock-o bigger-110 hidden-480"></i>
										成交时间
									</th>
								</tr>
							</thead>
							@if(empty($data))
							@else
							<tbody>
							@foreach($data as $key=>$val)
								<tr align="center">
									<td align="center">
										<a href="#">{{$key+1}}</a>
									</td>
									<td align="center">{{$val['number_no']}}</td>
									<td align="center">
										@if($val['type']==1)
											买
										@else
											卖
										@endif
									</td>
									<td align="center">{{$val['account']}}</td>
									<td align="center">{{$val['account_sid']}}</td>
									<td align="center">{{$val['name_en']}}</td>
									<td align="center">{{$val['num']}}</td>

									<td align="center">{{$val['price']}}</td>

									<td align="center">{{$val['proc']}}</td>
									<td align="center">{{$val['created_at']}}</td>
								</tr>
							@endforeach

							</tbody>
								@endif
						</table>
					</div>
				</div>
			</div>
			<!-- PAGE CONTENT ENDS -->
		</div><!-- /.col -->

		<div class="modal-footer no-margin-top">

            @if(empty($url))
                {{$result->links()}}
            @else
                {{$result->appends($url)->links()}}
            @endif
		</div>
	</div><!-- /.row -->
</div><!-- /.page-content -->

@endsection

@section('after.js')
	<script src="{{asset('/data/laydate.dev.js')}}"></script>
	<script type="text/javascript">
        var start_at = {
            elem: '#start_at',
            format: 'YYYY-MM-DD hh:mm:ss',
            min: '2018-01-01', //设定最小日期为当前日期
            max: '2099-06-16', //最大日期
            istime: true,
            istoday: false,
            choose: function(datas){

            }
        };
        var back_date = {
            elem: '#back_date',
            format: 'YYYY-MM-DD hh:mm:ss',
            min: '2018-01-01', //设定最小日期为当前日期
            max: '2099-06-16', //最大日期
            istime: true,
            istoday: false,
            choose: function(datas){

            }
        };
        laydate(start_at);
        laydate(back_date);

	</script>
@endsection
